﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Marmat.Forms.Skin
{
    /// <summary>
    /// 按钮组的集合
    /// </summary>
    public class ButtonGroupItemCollection : ControlItemCollection<ButtonGroupItem>
    {
        public ButtonGroupItemCollection(Control control) : base(control)
        {
        }

        public override void Add(ButtonGroupItem item)
        {
            if (string.IsNullOrEmpty(item.Name))
                item.Name = nameof(ButtonGroupItem) + (base.Count + 1);
            base.Add(item);
        }
    }
}
